allGuests = {'Alice':{'Apples':5, 'Bananas':12},
             'Bob':{'Banana':3, 'Apples':8},
             'Carol':{'Cups':15, 'Apple Pies':12}
             }

def totalBrought(guests, item):
    numBrought = 0
    print(guests.items())
    for k, v in guests.items():
        print(k)
        print(v)
        numBrought = numBrought + v.get(item, 0)
    return numBrought

print('Number of things beging brought:')
print(' - Apples ' + str(totalBrought(allGuests, 'Apples')))
